<include file="Public/header" />
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>论题管理</h3>
      <ul class="tab-base">
        <li><a href="JavaScript:void(0);" class="current"><span>管理</span></a></li>
        <li><a href="{:U('Article/comment_port')}"><span>论点下载 </span></a></li>
        <!-- <li><a href="{:U('Article/article_add')}" ><span>添加</span></a></li> -->
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form method="get" name="formSearch">
    <table class="tb-type1 noborder search">
      <tbody>
        <tr>
          <th><label for="article_title">标题</label></th>
          <td><input type="text" value="{$search['article_title']}" name="article_title" id="article_title" class="txt"></td>
          <th><label for="search_ac_id">分类</label></th>
          <td>
          <!-- <select name="ac_id" id="ac_id" class="">
			<option value="">请选择...</option>
		  	<volist name="ac_list" id="vo">	
			<option <if condition="$search['ac_id'] eq $vo['ac_id']">selected='selected'</if> value="{$vo['ac_id']}">{$vo['ac_name']}</option>
		  	</volist>	
          </select> -->
          <select name="article_id" id="article_id" class="">
			<option value="">请选择...</option>
		  	<volist name="article_list" id="vo">	
			<option <if condition="$search['article_id'] eq $vo['article_id']">selected='selected'</if> value="{$vo['article_id']}">{$vo['article_title']}</option>
		  	</volist>	
          </select>
          </td>
          <td>
            <a href="javascript:document.formSearch.submit();" class="btn-search tooltip" title="查询">&nbsp;</a>
            <if condition="($search['article_title'] neq '') OR ($search['ac_id'] neq '')">
            <a href="{:U('')}" class="btns tooltip" title="取消查询"><span>取消查询</span></a>
            </if>
         </td>
        </tr>
      </tbody>
    </table>
  </form>
  <table class="table tb-type2" id="prompt">
    <tbody>
      <tr class="space odd">
        <th colspan="12"><div class="title">
            <h5>操作提示</h5>
            <span class="arrow"></span></div></th>
      </tr>
      <tr>
        <td><ul>
            <li></li>
          </ul></td>
      </tr>
    </tbody>
  </table>
  <form method="post" id="form_article">
    <table class="table tb-type2">
      <thead>
        <tr class="thead">
          <th class="w24"></th>
          <th>发布人</th>
          <th>论题</th>
          <th class="align-center">状态</th>
          <th class="align-center">立场</th>
          <th class="align-center">添加时间</th>
          <th class="w200 align-center">操作</th>
        </tr>
      </thead>
      <tbody>
        <notempty name="list">
        <volist name="list" id="v">
        <tr class="hover">
          <td><input type="checkbox" name='del_id[]' value="{$v['id']}" class="checkitem"></td>
          <td>{$v['Member']['member_id']|get_member_nickname}</td>
          <td><a href="{:U('Article/article_edit',array('article_id'=>$v['Article']['article_id']))}">{$v['Article']['article_title']}</a></td>
          <td class="align-center">
          <eq name="v['reply_member_id']" value="0">论点
          <else/><if condition="get_reply_position($v['id'])">同意<else/>反驳</if>{$v['reply_member_id']|get_member_nickname}
          </eq>
          </td>
          <td class="nowrap align-center">
          <if condition="$v['position'] eq 1">赞同
          <elseif condition="$v['position'] eq -1"/>反对
          <else/>论点
          </if>
          </td>
          <td class="nowrap align-center">{$v['addtime']|date='Y-m-d H:i:s',###}</td>
          <td class="align-center">
          <a class="barbecue" dialog_id="edit" nc_type="dialog" dialog_title="编辑" dialog_width="500" uri="{:U('curdComment',array('id'=>$v['id']))}" href="javascript:void(0);">编辑</a>
          <a class="barbecue" href="{:U('report_list_of_comment',array('id'=>$v['id']))}">举报({$v['report_count']})</a>

          </td>
        </tr>
        </volist>
        <else/>
        <tr class="no_data">
          <td colspan="10">暂时无记录</td>
        </tr>
       </notempty>
      </tbody>
      <tfoot>
        <notempty name="list">
        <tr class="tfoot">
          <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
          <td colspan="16"><label for="checkallBottom">全选</label>
            &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn" onclick="if(confirm('你确定要删除？')){$('#form_article').submit();}"><span>删除</span></a>
            <div class="pagination">{$show_page}</div></td>
        </tr>
        </notempty>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript" src="__STATIC__/common.js"></script>  
<script language="javascript" src="__STATIC__/dialog/dialog.js"  id="dialog_js" charset="utf-8"> </script> 
<script type="text/javascript" src="__STATIC__/jquery-ui/jquery.ui.js"></script> 
<script type="text/javascript" src="__STATIC__/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/jquery-ui/themes/ui-lightness/jquery.ui.css"  />
<link href="__STATIC__/dialog/custom.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
$('a[nc_type="dialog"]').click(function(){
	var id = $(this).attr('dialog_id');
	var title = $(this).attr('dialog_title') ? $(this).attr('dialog_title') : '';
	var url = $(this).attr('uri');
	var width = $(this).attr('dialog_width');
	CUR_DIALOG = ajax_form(id, title, url, width,0);
	return false;
});
</script>
<include file="Public/footer" />